<!DOCTYPE html>
<html lang="zh-CN" style="height: 100%">
<head>
  <meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
  <div id="container" style="height: 100%"></div>


  <script type="text/javascript" src="{{ url_for('static', filename='echarts.min.js') }}"></script>

  <script type="text/javascript">
    var dom = document.getElementById('container');
    var myChart = echarts.init(dom, null, {
      renderer: 'canvas',
      useDirtyRect: false
    });
    var app = {};

    var option;
    option = {
  title: {
    text: '昌平房源走势'
  },
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['200-430万电梯房', '200-430万','昌平总房源' ]
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: {{ date|tojson }}
  },
  yAxis: {
    type: 'value'
  },
  series: [

    {
      name: '200-430万电梯房',
      type: 'line',
      data: {{ data3 }}
    },

    {
      name: '200-430万',
      type: 'line',
      data: {{ data2 }}
    },
    {
      name: '昌平总房源',
      type: 'line',
      data: {{ data1 }}
    }
  ]
};

    if (option && typeof option === 'object') {
      myChart.setOption(option);
    }

    window.addEventListener('resize', myChart.resize);
  </script>
</body>
</html>